翻訳と辞書
Words near each other
・ source-level debugger
・ southbridge
・ sp
・ sp/2
・ sp/k
・ sp2
・ space
・ space bar
・ space complexity
・ space key
space leak
・ space-cadet keyboard
・ spacewar
・ spade
・ spaghetti code
・ spaghetti inheritance
・ spam
・ spamdex
・ spamming
・ spanning tree algorithm


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

space leak : FOLDOC
space leak
A data structure which grows bigger, or lives longer, than might be expected. Such unexpected memory use can cause a program to require more {garbage collections} or to run out of heap. Space leaks in {functional programs} usually result from excessive laziness. For example, the Haskell function
sum [] = 0
sum (x:xs) = x + sum xs

when applied to a list will build a chain of closures for the additions and only when it reaches the end of the list will it perform the additions and free the storage. Another example is the function
mean l = sum l / length l

The sum function forces the entire list l to be evaluated and built in the heap. None of it can be garbage collected until the length function has consumed it.



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.